importPackage(net.sf.odinms.client);
importPackage(net.sf.odinms.server.maps);

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.sendOk("See you next time");
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			if (cm.getChar().getMapId() == 260000000) {
				cm.sendYesNo("I can send you to henesys if you want");
			} else {
				cm.sendYesNo("I can send you to Ariant if you want");
			}
		} else if (status == 1) {
			if (cm.getChar().getMapId() == 260000000) {
				cm.warp(100000000);
				cm.dispose();
			} else {
				cm.warp(260000000);
				cm.dispose();
			}
		}
	}
}